package com.crm.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Size;

import org.hibernate.annotations.GenericGenerator;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@Entity
@Table(name="home_page_chart")
@ApiModel("轮播图")
public class HomePageChart implements Serializable{

	private static final long serialVersionUID = 1L;
	
	@Id
	@GenericGenerator(name = "system-uuid", strategy = "uuid2")
	@GeneratedValue(generator = "system-uuid")
	@ApiModelProperty(value="轮播图id",required=true,hidden = true)
	private String id;
	
	@Size(max=3000)
	@ApiModelProperty(value="点击轮播图详情链接",required=true)
	private String url;
	
	@Size(max=3000)
	@ApiModelProperty(value="轮播图图片",required=true)
	private String img;
	
	@ApiModelProperty(value="轮播图是否有效",required=true)
	private boolean flag;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	public boolean isFlag() {
		return flag;
	}
	public void setFlag(boolean flag) {
		this.flag = flag;
	}
	@Override
	public String toString() {
		return "HomePageChart [id=" + id + ", url=" + url + ", img=" + img + ", flag=" + flag + "]";
	}
	
}
